package ai.people.netmon.framework.domain.warning.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 预警账号收藏表
 * @TableName warning_account_collect
 */
@Builder
@TableName(schema = "service_warning", value ="warning_account_collect")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class WarningAccountCollect implements Serializable {
    /**
     * 
     */
    @TableId
    private Long id;

    /**
     * 用户ID
     */
    private Long collectUserId;

    /**
     * 账号id
     */
    private String collectAccountId;

    /**
     * 收藏来源
     */
    private Integer collectSource;

    /**
     * 账号名称
     */
    private String collectAccountName;

    /**
     * 账号描述
     */
    private String collectAccountDescription;

    /**
     * 账号源
     */
    private String collectAccountPlatform;

    /**
     * 账号标签
     */
    private String collectAccountLabel;

    /**
     * 账号链接
     */
    private String collectAccountUrl;

    /**
     * 头像
     */
    private String collectAccountHeadImage;

    /**
     * 数据创建时间
     */
    private Date createTime;

    /**
     * 数据更新时间
     */
    private Date ts;

    /**
     * 是否删除 1是 0否
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


    /**
     * 构建
     *
     * @param accountId       帐户id
     * @param accountPlatform 账户平台
     * @param userId          用户id
     * @return {@link WarningAccountCollect}
     */
    public static WarningAccountCollect build(String accountId,String accountPlatform,Long userId){
        WarningAccountCollect warningAccountCollect = new WarningAccountCollect();
        warningAccountCollect.setCollectAccountId(accountId);
        warningAccountCollect.setCollectAccountPlatform(accountPlatform);
        warningAccountCollect.setCollectUserId(userId);
        return warningAccountCollect;
    }
}